package cn.com.connext.scrm.domain.master;

import cn.com.connext.scrm.domain.enumeration.AuditStatus;
import cn.com.connext.scrm.domain.enumeration.DeleteStatus;
import com.connext.common.domain.UUIDDomain;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * Created by YANG205 on 2018/6/27.
 */
@Entity
@Table(name = "note")   // 定义数据库表名
public class Note implements UUIDDomain, Serializable {
    private static final long serialVersionUID = -7076719498158725864L;

    @Id
    private String id;

    @Column(name = "title")
    private String title;

    @Column(name = "img_url")
    private String imgUrl;

    @Column(name = "circle_id")
    private String circleId;

    @Column(name = "user_id", nullable = false)
    private String userId;

    @Column(name = "content", nullable = false)
    private String content;

    @Column(name = "note_type", nullable = false)
    private Integer noteType;

    @Column(name = "tag")
    private String tag;

    @Column(name = "relevant_products")
    private String relevantProducts;

    @Column(name = "activity_id")
    private String activityId;

    @Column(name = "create_time", nullable = false)
    private ZonedDateTime createTime;

    @Column(name = "update_time")
    private ZonedDateTime updateTime;

    @Column(name = "audit_status")
    @Enumerated(EnumType.STRING)
    private AuditStatus auditStatus;

    @Column(name = "delete_status", nullable = false)
    @Enumerated(EnumType.STRING)
    private DeleteStatus deleteStatus;

    @Column(name = "is_repost", nullable = false)
    private Boolean isRepost;

    @Column(name = "original_id")
    private String originalId;

    @Column(name = "author_id")
    private String authorId;

    @Column(name = "inviter_id")
    private String inviterId;

    @Column(name = "is_top")
    private Boolean isTop = false;

    @Column(name = "is_hot")
    private Boolean isHot = false;//热门

    @Column(name = "created_index")
    private Integer createdIndex;

    @Column(name = "is_rate")
    private Boolean isRate = false;

    @Column(name = "complex_score")
    private Double complexScore;

    @Column(name = "search_content")
    private String searchContent;

    @Column(name = "is_answer")
    private Boolean isAnswer = false;//是否是问答

    @Column(name = "answer_type")
    private String answerType;//问答分类表主键

    @Column(name = "audit_result")
    private Integer auditResult;//0初始状态  1审核通过  2 审核未通过

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getCircleId() {
        return circleId;
    }

    public void setCircleId(String circleId) {
        this.circleId = circleId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getNoteType() {
        return noteType;
    }

    public void setNoteType(Integer noteType) {
        this.noteType = noteType;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getRelevantProducts() {
        return relevantProducts;
    }

    public void setRelevantProducts(String relevantProducts) {
        this.relevantProducts = relevantProducts;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public ZonedDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(ZonedDateTime createTime) {
        this.createTime = createTime;
    }

    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public AuditStatus getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(AuditStatus auditStatus) {
        this.auditStatus = auditStatus;
    }

    public DeleteStatus getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(DeleteStatus deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public Boolean getRepost() {
        return isRepost;
    }

    public void setRepost(Boolean repost) {
        isRepost = repost;
    }

    public String getOriginalId() {
        return originalId;
    }

    public void setOriginalId(String originalId) {
        this.originalId = originalId;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getInviterId() {
        return inviterId;
    }

    public void setInviterId(String inviterId) {
        this.inviterId = inviterId;
    }

    public Boolean getTop() {
        return isTop;
    }

    public void setTop(Boolean top) {
        isTop = top;
    }

    public Integer getCreatedIndex() {
        return createdIndex;
    }

    public void setCreatedIndex(Integer createdIndex) {
        this.createdIndex = createdIndex;
    }

    public Boolean getRate() {
        return isRate;
    }

    public void setRate(Boolean rate) {
        isRate = rate;
    }

    public Double getComplexScore() {
        return complexScore;
    }

    public void setComplexScore(Double complexScore) {
        this.complexScore = complexScore;
    }

    public String getSearchContent() {
        return searchContent;
    }

    public void setSearchContent(String searchContent) {
        this.searchContent = searchContent;
    }

    public String getAnswerType() {
        return answerType;
    }

    public void setAnswerType(String answerType) {
        this.answerType = answerType;
    }

    public Integer getAuditResult() {
        return auditResult;
    }

    public void setAuditResult(Integer auditResult) {
        this.auditResult = auditResult;
    }

    public Boolean getHot() {
        return isHot;
    }

    public void setHot(Boolean hot) {
        isHot = hot;
    }

    public Boolean getAnswer() {
        return isAnswer;
    }

    public void setAnswer(Boolean answer) {
        isAnswer = answer;
    }
}
